<template>
  <div style="padding: 24px">
    <el-table :data="data" border>
      <el-table-column prop="id" label="ID" align="center" />
      <el-table-column prop="name" label="名称" align="center" />
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <router-link :to="`${EnumRouter.formDetail}?id=${scope.row.id}`">
            <el-link type="primary" :underline="false">查看</el-link>
          </router-link>
          <!--          <el-link type="primary" style="margin-left: 24px" :underline="false">关联流程</el-link>-->
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import EnumRouter from '@/constants/EnumRouter';
import { GetFormConfigList } from '@/api/formManagement';
export default {
  name: 'FormList',
  data() {
    return {
      data: [
        {
          id: 1,
          name: '表单1'
        }
      ]
    };
  },
  computed: {
    EnumRouter: () => EnumRouter,
    key() {
      return this.$route.path;
    }
  },
  mounted() {
    this.getListData();
  },

  methods: {
    getListData() {
      GetFormConfigList().then(res => {
        const { data } = res;
        this.data = data;
      }, err => {
        this.$message.error(err.msg);
      });
    }
  }
};
</script>

<style scoped>

</style>
